window.onload=function(){
	mui.init()
	var area = "地址";
	var picker = new mui.PopPicker({
	    layer: 3,
	    buttons:['取消','完成']
	})

    picker.setData([
    	{
	        value: '100',
	        text: '广西',
	        children: [{
                value: "110",
                text: "玉林",
                children: [{
	                value: "111",
	                text: "富锦区"
	        	},{
	                value: "112",
	                text: "容县"
	       		},{
	                value: "113",
	                text: "陆川县"
		        },{
		        	value: "114",
	                text: "博白县"
		        },{
		        	value: "115",
	                text: "兴业县"
		        }]
	        }]
	    },
    ])

	
	picker.pickers[0].setSelectedIndex(0);
	picker.pickers[1].setSelectedIndex(0);
	picker.pickers[2].setSelectedIndex(0);


	document.getElementById('set-area').addEventListener('tap',function(){
		picker.show(function(SelectedItem) {
			console.log(SelectedItem);
			area=SelectedItem[2].text;
			document.querySelector("#area").innerHTML = area;
		})
	})
}
